/*------------------------------------------------------------------------------

	  Sample.r	-  Resources for the Sample Application

	  Copyright Apple Computer, Inc. 1985-1987
	  All rights reserved.

------------------------------------------------------------------------------*/

#include "Types.r"

/* These define's are used in the MENU resources to disable specific
   menu items. */
#define AllItems	0b1111111111111111111111111111111	/* 31 flags */
#define MenuItem1	0b00001
#define MenuItem2	0b00010
#define MenuItem3	0b00100
#define MenuItem4	0b01000
#define MenuItem5	0b10000

resource 'WIND' (128, "Sample Window") {
	{60, 30, 450, 530},
	documentProc, visible, noGoAway, 0x0, "Source Window"
};

resource 'WIND' (129, "Popup Window") {
	{75, 80, 300, 440},
	documentProc,                     /* plainDBox, */
	visible,
	noGoAway,
	0x0,
	"Popup Window"
};


resource 'DLOG' (128, "About SampleÉ") {
	{66, 102, 224, 400},
	dBoxProc, visible, noGoAway, 0x0, 128, ""
};

resource 'DITL' (128) {
	 {
/* 1 */ {130, 205, 150, 284},
		button {
			enabled,
			"Continue"
		};
/* 2 */ {104, 144, 120, 296},				/* SourceLanguage Item */
		staticText {
			disabled,
			""
		};
/* 3 */ {88, 144, 105, 218},				/* Author Item */
		staticText {
			disabled,
			""
		};
/* 4 */ {8, 32, 26, 273},
		staticText {
			disabled,
			"Macintosh Programmer's Workshop"
		};
/* 5 */ {32, 80, 50, 212},
		staticText {
			disabled,
			"Sample Application"
		};
/* 6 */ {56, 16, 74, 281},
		staticText {
			enabled, "Copyright © 1985,1986 Apple Computer"
		};
/* 7 */ {88, 16, 104, 144},
		staticText {
			enabled, "Source Language:"
		};
/* 8 */ {104, 16, 120, 144},
		staticText {
			enabled, "Brought to you by:"
		}
	}
};

resource 'MENU' (128, "Apple", preload) {
	128, textMenuProc,
	AllItems & ~MenuItem2,	/* Disable item #2 */
	enabled, apple,
	{
		"About SampleÉ",
			noicon, nokey, nomark, plain;
		"-",
			noicon, nokey, nomark, plain
	}
};

resource 'MENU' (129, "File", preload) {
	129, textMenuProc,
	allEnabled,
	enabled, "File",
	{
		"Do Popup Window",
			noicon, nokey, nomark, plain;
		"Animate",
			noicon, nokey, nomark, plain;
		"Quit",
			noicon, "Q", nomark, plain
	}
};

resource 'MENU' (130, "Edit", preload) {
	130, textMenuProc,
	AllItems & ~(MenuItem1 | MenuItem2),	/* Disable items #1 & #2 */
	enabled, "Edit",
	 {
		"Undo",
			noicon, "Z", nomark, plain;
		"-",
			noicon, nokey, nomark, plain;
		"Cut PICT",
			noicon, "X", nomark, plain;
		"Copy",
			noicon, "C", nomark, plain;
		"Paste",
			noicon, "V", nomark, plain;
		"Clear",
			noicon, nokey, nomark, plain
	}
};


type 'CSMP' as 'STR ';

resource 'CSMP' (0) {
	"Sample C Application - Version 2.0"
};

resource 'ICN#' (128) {
	{	/* array: 2 elements */
		/* [1] */
		$"0000 0000 70EF CE0E 4928 2AEA 462B AAAA"
		$"50AA AAAA 59AB AAAA 56A8 2AAA 50AB CAAA"
		$"50AA 0B1A 50AA 0842 70EE 0FBE 0000 0000"
		$"0000 0000 7FFF FFFE 4000 0002 400F F002"
		$"401F F802 403F FC02 407C 3C02 4078 0002"
		$"4078 0002 4078 0002 407C 3C02 403F FC02"
		$"401F F802 400F F002 4000 0002 7FFF FFFE",
		/* [2] */
		$"0000 0000 70EF CE0E 79EF EEEE 7FEF EEEE"
		$"7FEE EEEE 7FEF EEEE 76EF EEEE 70EF CEEE"
		$"70EE 0FFE 70EE 0FFE 70EE 0FBE 0000 0000"
		$"0000 0000 7FFF FFFE 7FFF FFFE 7FFF FFFE"
		$"7FFF FFFE 7FFF FFFE 7FFF FFFE 7FFF FFFE"
		$"7FFF FFFE 7FFF FFFE 7FFF FFFE 7FFF FFFE"
		$"7FFF FFFE 7FFF FFFE 7FFF FFFE 7FFF FFFE"
	}
};

resource 'BNDL' (128) {
	'CSMP',
	0,
	{
		'ICN#',
		{
			0, 128
		},
		'FREF',
		{
			0, 128
		}
	}
};

resource 'FREF' (128) {
	'APPL',
	0,
	""
};

resource 'pltt' (128,"My Palette") 
{
 	{
		0xffff, 0xffff, 0xffff, pmTolerant, 0x0,
		0x0, 0x0, 0x0, pmTolerant, 0x0,
		0xfc00, 0xf37d, 0x052f, pmAnimated, 0x0,
		0xffff, 0x648a, 0x028c, pmAnimated, 0x0,
		0x0371, 0xc6ff, 0x9ec9, pmAnimated, 0x0,
		0x0, 0xa000, 0x0, pmTolerant, 0x0,
		0x0, 0x0, 0xd400, pmTolerant, 0x0,
		0xdd6b, 0x08c2, 0x06a2, pmTolerant, 0x0,
		0xc000, 0xc000, 0xc000, pmTolerant, 0x0,
		0x8000, 0x8000, 0x8000, pmTolerant, 0x0,
		0xffff, 0xc3dc, 0x8160, pmTolerant, 0x0,
		0x93ff, 0x281a, 0x12cc, pmTolerant, 0x0,
		0x6524, 0xc2ff, 0x0, pmTolerant, 0x0,
		0x0, 0xffff, 0x04f1, pmTolerant, 0x0,
		0x65de, 0xad85, 0xffff, pmTolerant, 0x0,
		0x8000, 0x0,0xffff, pmTolerant, 0x0,
	}
 
};
resource 'pltt' (129,"Same Palette") 
{
 	{
		0xffff, 0xffff, 0xffff, pmTolerant, 0x0,
		0x0, 0x0, 0x0, pmTolerant, 0x0,
		0xfc00, 0xf37d, 0x052f, pmTolerant, 0x0,
		0xffff, 0x648a, 0x028c, pmTolerant, 0x0,
		0x0371, 0xc6ff, 0x9ec9, pmTolerant, 0x0,
		0x0, 0xa000, 0x0, pmTolerant, 0x0,
		0x0, 0x0, 0xd400, pmTolerant, 0x0,
		0xdd6b, 0x08c2, 0x06a2, pmTolerant, 0x0,
		0xc000, 0xc000, 0xc000, pmTolerant, 0x0,
		0x8000, 0x8000, 0x8000, pmTolerant, 0x0,
		0xffff, 0xc3dc, 0x8160, pmTolerant, 0x0,
		0x93ff, 0x281a, 0x12cc, pmTolerant, 0x0,
		0x6524, 0xc2ff, 0x0, pmTolerant, 0x0,
		0x0, 0xffff, 0x04f1, pmTolerant, 0x0,
		0x65de, 0xad85, 0xffff, pmTolerant, 0x0,
		0x8000, 0x0,0xffff, pmTolerant, 0x0,
	}
 
};
